updated write&retrieve for profScript
Merge pull request #2 from thesamtang/master

updated write&retrieve for profScript