refactored error, warning and status messaging