Preventing headless to run when on MacOS