refactor ftp server