fmt -> log
Separated code into packages.