fixed createfilelist() and closefilelist()