logging and resources
type system generation corrected