Modified legend file and reading legend file is now functional