If your computer is shutdown incorrectly whilst mIRC is running there's a good chance you'll lose parts of your logs. mIRC could help prevent this by flushing more often, or you could try disabling Write Caching on the drive in question.