TW-25: Adds error handling if the file was not uploaded correctly