Modify discover.sh to remove sub temp files