MODE-2302 Added upgrade function for the new trash file format and fixed reported logging issues.