If an error occured while syncing and ignore_failed_copy==True, then exit with -1