Added ability to specify save path.