fixed file logging