Add attachConsole option. Fix bug in filterHeaders.