Improved documentation and added ability to set the file name pattern.