Lantern programs must be wrapped in a Lantern.main function to ensure correct execution order