change __file__ to getcwd() to fix some file location problem
refactoring