File detection