making console logging optional