Handling grep failure