Formatting; nicer error message if in headless mode; fixes #164