Added more logging to TypeFactory