MFH clean.sh race fixes and optimizations