I'm assuming that "does not work properly" means it transfers nothing at all. The error message you have logged will probably be relevant here - have you looked at it?
Without running this code as a service myself, I would have to guess, but my first thought would be to look at the service access permissions. Since when you run it as an app it works, and doesn't as a service, it is likely that the file is accessible to the user who executes the application, but not to the service, which runs as a different user altogether. You may have to either change teh permissions, or run teh service as a different user. This may help: http://stackoverflow.com/questions/4453646/windows-service-choose-user-or-system-account-on-install