error checking and notification