         </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

            <Row>
                <Col sm=3>
                    <ProjectFilesSearch
                        key               = {@props.current_path}
                        file_search       = {@props.file_search}
                        actions           = {@props.actions}
                        current_path      = {@props.current_path}
                        selected_file     = {visible_listing?[0]}
                        create_file_alert = {@props.create_file_alert}
                        files_displayed   = {visible_listing?.length > 0}
                        create_file       = {@create_file}
                        create_folder     = {@create_folder} />
                </Col>
                {@render_new_file() if not public_view}
                <Col sm={if public_view then 6 else 4}>

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

    handle_creation_error : (e) ->
        @props.actions.setState(file_creation_error : e)

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