added mongoose database and file searching