Shared/Logs: Make AppenderFile more thread-safe

In case of dynamic file names don't store the FILE* handle in a shared class variable but keep it only at function scope.