Added plot saving to file.