clean up old tmpdir if exists
ignore WINDOW env variable