[CA-129187] & [CA-116748]: remove xs path to ignore error if path does not exist

Also modified the way exception is raised, use Exception class
instead of string

Signed-off-by: Vineeth Thampi Raveendran <vineeth.thampi@citrix.com>