Some fixes with file searching