Fixed duplicate lua file output issue I think - flush before fork.