Fixed bug with checking for file upload