Root check added with old bug fix used sed instead of grep