read test case from file, and fix some issues