temp files and linking stem script