use temp file instead of pipe