More verbose debugging (not using a WriterT) and catching of GHC exceptions.