Capture error 500 on file delivery, add extra logging