auto-detection of files