pipe file working except not yet writing headers