Fix error if out directory is empty