Speed up the directory scanning