Refactoring2

use log and not fmt to print on the stdout