Fixed bugs with opening file. Task 1 complete.