Headless Mode And Auto Return Function