log errors as they occur