add manifest file source and fix some bugs