Updated the function to check if pandoc is installed