added resource.txt parsing and saving