bash: return -1 if no sync is found in find_sync()