ensure errors are logged