fix deadlock on errors in the backup scripts