I've had this happen before too. I think MaxIDE saves the open files when you run a project, and if the power outage happens to time it badly, bosh, your file is empty. It used to happen with Protean too, so I'm not sure if it's inherent in the IDE or the compiler, but I haven't ( touch wood ) had it happen in Blide yet.