improve log and ftp connection