Fixed log output after calling close()