To prevent manual reloading page if log file doe not exists run while loop