added implementation of parseFile() and a new exception