use temp file for input passing