Added ability to specify directory path