Fix exceptions thrown in parseModFile