rewritten part of testFile function; included other test cases; some bugs are not found because TypeChef does not implement some checks