eas-logger: fixed file leak

Found by cppcheck: when using log level G_LOG_LEVEL_ERROR in combination
with a debug file, the file was opened, not used and not closed.

Not sure what the intended result is. At least let's close the file.