fixed printing, exception logging