Added handling for a special case.

Previously if logger didnt log any messages, only the closing decoration
of the output would be written to a file.