modify MyGrep function to take file type