add a better grep management for logcat script