merging.py: fixed bug in handling stdout