adding file detection