fixed infinite loop

completely refactored/modified the code in folder_hunterv2, had to
modify main_html and get_text_filev1 also.