new test 023 for close() and some minor changes to close()