Third Commit

Updated files to handle errors