Added javascript checking to ensure a file is uploaded