         </MenuItem>
 
     handle_menu_click : (ext) ->
-        if @props.file_search.length == 0
+        if not @props.file_search?.length > 0
             # Tell state to render an error in file search
-            @props.actions.setState(create_file_alert : true)
+            @props.actions.setState(file_creation_error : "You must enter file name above to create it")
         else if @props.file_search?[@props.file_search.length - 1] == '/'
             @props.create_folder()
         else

            ext          : ext
            current_path : @props.current_path
            on_download  : ((a) => @setState(download: a))
            on_error     : ((a) => @setState(error: a))
        @props.actions.setState(file_search : '', page_number: 0)

    create_folder : ->
        @props.actions.create_folder(@props.file_search, @props.current_path, (a) => setState(error: a))

                {text}
            </Alert>

    render_file_creation_error : ->
        if @props.file_creation_error
            <Alert style={wordWrap:'break-word'} bsStyle='warning' onDismiss=@dismiss_alert>
                {@props.file_creation_error}
            </Alert>

    dismiss_alert : ->
        @props.actions.setState(file_creation_error : '')

    search_submit: ->
        # TODO: Add visual indication that a file is selected at all.
