improve configure
fix path bug
improve error
minor fix