console logging for errors