Few fixed. Need to figure out how to avoid SIGPIPE