file uploading and error handling