Can you post the actual error you're getting? You definitely don't need the second with the opening php tag as the tag is added when the custom island is submitted.