Fix some issues when loading to python file or directory