removed unused inputFile parameter
added workWithOneFile function (incomplete: level check is not implemented)
added error handling to places where parseType is called