add proxy logging function and fix tput calculation bug