refs #14. fixed some bugs, add some new feature. (c_app, sync process when the app is on).