added search and fixed file input