lmpsizes.py: handling closed output pipes