restructured env module
added logging utility