Checking console before logging