fixed null exception with missing -d parameter
fixed XPath query. Removed ReadLine()