Refactoring file transfer client