Fixed wrong check for uploaded file.