fix the number of test
improve the syntax
debug=3 messages will be printed on STDERR