return error value
fix typo in context checking error message
cleanup error formatting