expose save/load to script to allow C type serialization