Replace sys.out by logger