clean up FTP uploader code slightly