alerting error instead of logging to console