Term frequency
Modify output filename
Avoid ZeroDivisionError