removed redundant dirname...