error in file upload handling code