file detection