(logger) Close the output stream after writing on it