Fix bugs and add a function to search a directory