Added error support for the library parser

Need to add the same support for the ic parser as well.
Also found a way to name the parser file when creating it (see the cmds
file).