[BUGFIX] Fatal error when file upload fails