Add test cases for invalid magic numbe and unknown term typer