reimplement the buildin in new framework; still has bug when create new files and may core dump in the execution