Update flushing, fix list_files