Fix memory leak in readFromFile function
Update lab4