fixed 'HostsPath' parsing
fixed cleanup function
added extra check for empty commands