Make debug logging optional, turn it off by default