Made fixs to the uploadFile method