add file detection