Improving the way to detect files.
#1