Changes in set_filename() function, to check the file_exist infinit time...

Changes in set_filename() function, to check the file_exist infinit time. Initially it was for only 100 times.