Fixed security bug by removing temp file