I think this will work.
Debugging.
More debugging.
Use the emitter.
More simple errors.
Close the FTP connection on finish.
More debugging.
Aaaaaannnnnd more debugging!