Then whole lines in finally block can be replaced with vmxml_backup.sync() as I said above.