Added logging of maximum S(q)