add logger close on error