Don't catch all exceptions and a bit of cleanup