Changed grain check to os_family and removed an early return from a loop.