fixed the IOError: [Errno 32] Broken pipe