Add basic logging support
Fix env variable reference