Added OpenLogFile function