set HTTP status 500 if the script dies and it's not too late