avoid shadowing comment() func in file mod

Also optimize comment string construction.