Added some error handling to help debug test issue when run on Travis