Added scripting capabilities to save to txt and png