Create color and match objects only once
Split grep_file function and add pipe input support