The previous version has some path naming error. Use this instead. Merged version 2.