title: Spring Integration | FTP - FILE Adapter Issue
body: <p>The application which i am working on has an Integration Layer build using Spring Integration 2.5, It tries to pull a CSV file from FTP server using FTP adapter and drops it on to local server which is polled by 
  File adapter. So as soon as file is downloaded by ftp the file adapter passes it on to Splitter wherein the CSV file is split into separate records and send to downstream for further processing. </p>
  
  <p>The issue occurs when splitter some times does not see the file tha is downloaded by the FTP adapter. Below is the config details and that piece of code from splitter which tries to check if the file exists and throws user defined exception if the file does not exists. </p>
  
  <p>The problem is that it always runs into the exception.</p>
  
  <pre><code>  &lt;ftp:inbound-channel-adapter id="ftpInbound" channel="ftpChannel"
          session-factory="ftpClientFactory"
          filename-regex="${ftp.server.remotefilename}"
          auto-create-local-directory="true" delete-remote-files="false"
          remote-directory="${ftp.server.remotefolder}"
          local-directory="file:${ftp.server.localfolder}"&gt;
          &lt;si:poller ref="FTPPoller"&gt;&lt;/si:poller&gt;
      &lt;/ftp:inbound-channel-adapter&gt;
      &lt;si:channel id="ftpChannel"&gt;
          &lt;si:queue /&gt;
      &lt;/si:channel&gt;
  
      &lt;file:inbound-channel-adapter id="fileInboundAdapter"
          channel="fileIn" directory="file:${ftp.server.localfolder}"
          filename-pattern="${ftp.server.localfilename}"
          auto-create-directory="true" prevent-duplicates="false"&gt;
          &lt;si:poller ref="filePoller"&gt;&lt;/si:poller&gt;
      &lt;/file:inbound-channel-adapter&gt;
  
      &lt;si:channel id="fileIn" /&gt;
  
      &lt;si:splitter input-channel="fileIn" output-channel="csvRowsIn" ref="inboundFileRowSplitter" method="extractRows" /&gt;
  </code></pre>
  
  <hr>
  
  <pre><code>public class InboundFileRowSplitter {
  
      @Splitter
      public Collection&lt;String[]&gt; extractRows( @Headers
      Map&lt;String, Object&gt; headers, File keywordFile ) {
  
         &gt;&gt;Other Processing&lt;&lt;
  
          return processKeywordsFile( keywordFile );
      }
  
  
      private Collection&lt;String[]&gt; processKeywordsFile( File keywordFile ) {
  
         try {
              if (keywordFile.exists()) {
  
               &gt;&gt;Other Processing&lt;&lt;
  
              } else {
                  throw new ResourceLoaderException( "............................" );
              }
  
          } catch (Exception e) {
              &gt;&gt;Other Processing&lt;&lt;
          } finally {
             &gt;&gt;Other Processing&lt;&lt;
          }
  
      }
  </code></pre>
  
  <p>In the below code it throws under defined expection ResourceLoaderException. Any suggestion on how to resolve this issue would be appreciated, Its Production issue and early response would really.</p>