Added debug option.
Improved scan path.
Added doc.