fix the insert bug and move cache directory to my documents