Improve error handling in TcRnMonad