Added option to specify output path/filename