solve file upload failed and add 404, 500 page