Implemented handleError and reportMessage