Updated script to avoid .txt output for cleanup