Added directory parsing