prev file search function