avoid failure when there is no directory