added more verification to file uploads