check for console before use