Checks the tokenized content in "sample" file and prints the output in the desired format