Fixed some naming conventions for previous commit. Also added defined some error codes and added file-exist checking for character data.