Added a close method and debugging