validation and ftp upload script