Clear tempfile bugfix