Implemented checking the file pointer in Logger_free and closing it if it is not
stdout.