allow running as headless app, issue #8