if any error occurs, just print out a general exception and return 1