FIX: try except around outer loop