MDL-21432 backup - file handling and other changes. Saving before changes tomorrow...