Fixed minor bug with single directory output