The problem is happening with following lines
```
public void rotateEditLog(String path) {
    if (INACTIVE) {
      return;
    }
    close(); // UFS is closed as well.
    LOG.info("Edit log max size reached, rotating edit log");
    String pathPrefix = path.substring(0, path.lastIndexOf("/")) + "/completed";
    LOG.info("path: "+ path + " prefix: " + pathPrefix);
    try {
      if (!UFS.exists(pathPrefix)) { // fail to use UFS to check exists, since it is closed in close() function.
...
```