corrected back frequency file naming
added the temporary directory auto-removal