Add test files
Fix a typo and support -d console