filter files and intial directory