changed print -> log and fixed import format

Please review this proposed fix for #147 .