exiting process on 500 error