python logging stdout and stderr to file