Tweaked code for the system folder filter