Added output argument to as list_folders()