move logging into debug environment variable .. sighs