better way to create temp. files