Call back is not getting reflected?

Hi guys… call back function is not getting reflected with the go… it takes some time to load… I am not able to trace the issue. below is my code

import base64
import os
from urllib.parse import quote as urlquote

from flask import Flask, send_from_directory
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
from bagpy import bagreader


UPLOAD_DIRECTORY = "C:/Users/fortu/Desktop/GPS/Loc-Test/"

if not os.path.exists(UPLOAD_DIRECTORY):
    os.makedirs(UPLOAD_DIRECTORY)


# Normally, Dash creates its own Flask server internally. By creating our own,
# we can create a route for downloading files directly:
server = Flask(__name__)
app = dash.Dash(server=server)

files = []

@server.route("/download/<path:path>")
def download(path):
    """Serve a file from the upload directory."""
    return send_from_directory(UPLOAD_DIRECTORY, path, as_attachment=True)


app.layout = html.Div(
    [
        html.H1("File Browser"),
        html.H2("Upload"),
        dcc.Upload(
            id="upload-data",
            children=html.Div(
                ["Drag and drop or click to select a file to upload."]
            ),
            style={
                "width": "100%",
                "height": "60px",
                "lineHeight": "60px",
                "borderWidth": "1px",
                "borderStyle": "dashed",
                "borderRadius": "5px",
                "textAlign": "center",
                "margin": "10px",
            },
            multiple=True,
        ),
        html.Div([
            dcc.Dropdown(
                id='file-list',
                options=[{'label': name, 'value': name} for name in files],
                value='dmoedakdfjkdj kdjfakdjfk'
            ),
        ], style={'width': '50%', 'display': 'inline-block'}),
        html.H2("File List"),
        html.Ul(id="demo-list"),
    ],
    style={"max-width": "500px"},
)


def save_file(name, content):
    """Decode and store a file uploaded with Plotly Dash."""
    data = content.encode("utf8").split(b";base64,")[1]
    with open(os.path.join(UPLOAD_DIRECTORY, name), "wb") as fp:
        fp.write(base64.decodebytes(data))


def uploaded_files():

    """List the files in the upload directory."""
    print(UPLOAD_DIRECTORY)
    for filename in os.listdir(UPLOAD_DIRECTORY):
        if filename.endswith('.bag'):
            path = os.path.join(UPLOAD_DIRECTORY, filename)
            if os.path.isfile(path) and '.bag' in path:
                b = bagreader(path)
                for t in b.topics:
                    files.append(t)
    return files


def file_download_link(filename):
    """Create a Plotly Dash 'A' element that downloads a file from the app."""
    location = "/download/{}".format(urlquote(filename))
    return html.A(filename, href=location)

@app.callback(
    Output("file-list", "value"),
    [Input("upload-data", "filename"), Input("upload-data", "contents")],
)
def update_output(uploaded_filenames, uploaded_file_contents):
    """Save uploaded files and regenerate the file list."""

    if uploaded_filenames is not None and uploaded_file_contents is not None:
        for name, data in zip(uploaded_filenames, uploaded_file_contents):
            save_file(name, data)

    files = uploaded_files()
    if len(files) == 0:
        return [html.Li("No files yet!")]
    else:
        return [html.Li(file_download_link(filename)) for filename in files]


@app.callback(
     dash.dependencies.Output('demo-list', 'value'),
    [dash.dependencies.Input('file-list', 'search_value')]
)
def update_options(search_value):
    return [{'label': i, 'value': i} for i in files]


if __name__ == "__main__":
    app.run_server(debug=False)

I am trying to upload a bag file after parsing it has to display all the topic in the dropdown and when the topic is selected onclick of submit button it has to store the particular topic into different csv file.