BF: fixed off-by-one error when searching for teardown.html; removed debug output