added exclude directories option