Fix error if a directory exists in the data directory