Fixed writing to log files.... -- Squizz