fix a bug of logging on terminals whose size is unknown
fix a bug of logging on terminals whose size is unknown

reporeted by @yosupo06 at https://github.com/kmyk/online-judge-tools/issues/609

kmyk/online-judge-tools,kmyk/online-judge-tools