added ability to save model to a specific file