Further improvements to neighborhood tree temp file handling