Catch and print exceptions