Fix for broken pipe issue

Signed-off-by: George K. Thiruvathukal <gkt@cs.luc.edu>
Merge pull request #17 from gkthiruvathukal/master

Fix for broken pipe issue