Ftp endpoint extra tests + refactoring