Added ability to use files from directory.