tweaked error handling routine for travis