Update the directory handling