Okay, I got it to work by adding p.stdin.finalize; after all the data was passed to the stdin. Thanks for the help!