fix bug with http 500 status code and improved IOError message