Changing stdout to logger