Beginning of find file function