Cleaned up SIGPIP hack in main