updated bucket constructor and added key number logging attribute