Update main.lua

Check if the file is opened correctly.