Use 'isDir' to  modify the compatibility