Added runForever method for headless processes