Move closedir into place