python logging redirect stdout to file