typechecker: changed env type to a record
types: modify logging to only be printed when 'verbose' is asked for