Move code from main.cpp to a BackupSystem class