Properly stop sync and cancel threads on fail.