removed wrong placed close() calls from tests