Added code to output hasCategory file