Added support for scanning only one file instead of a directory