You also want to log the stack trace here.  That way, if it does fail, we know where it failed.  The error reason alone is often not enough to determine that.  You can get trace via `erlang:get_stacktrace()`.