closing file when not logging -- should correct truncate issues