Added level parameter to stats socket option