added check for how to display error as in some environments the error was not being displayed