adds logs and test for close
fixes merge conflict