public static void main(String[] args) throws IOException, JSONException, InfluException
    {
        ArrayList<DetailedMovie> top250Movies = new ArrayList<>();
        String arrayString = FileManager.readFile("refined.json");
        JSONArray jsonArray = new JSONArray(arrayString);

        Calendar startTime = Calendar.getInstance();

        for (int i = 0; i < jsonArray.length(); i++)
        {
            if (i == 0)
            {
                InfluLogger.print("Now fetching movie: " + (i + 1));
            }
            else
            {
                Calendar now = Calendar.getInstance();
                float difference = (now.getTimeInMillis() - startTime.getTimeInMillis()) / 60000f;
                difference = (difference / i) * (250 - i);
                InfluLogger.print("Now fetching movie: " + (i + 1) + ".\tEstimated time remaining: " + (int) difference + " minutes.");
            }
            JSONObject jsonObject = jsonArray.getJSONObject(i);
            Movie movie = new Movie(jsonObject.getInt("imdbId"), jsonObject.getString("title"), jsonObject.getInt("year"), jsonObject.getString("uri"));

            String query = URLEncoder.encode(movie.imdbTitle, "UTF-8");
            String url = RT_MOVIE_SEARCH + query;//+ SEARCH_RESULT_LIMIT;
            String response;
            try
            {
                response = HttpResponseGetter.getHttpResponse(url);
            }
            catch (InfluException ex)
            {
                InfluLogger.print("Movie unsuccessful: " + movie.imdbTitle);
                continue;
            }
            String matchedMovieRTURL = "";
            try
            {
                matchedMovieRTURL = matchMovieFromRT(response, movie);
                if (matchedMovieRTURL != null)
                {
                    DetailedMovie detailedMovie;
                    try
                    {
                        detailedMovie = getDetailedMovieFromRTByURL(matchedMovieRTURL + "?" + RT_KEY, movie);
                    }
                    catch (InfluException ex)
                    {
                        continue;
                    }
                    matchMovieAndGetDetailsFromTMDB(detailedMovie);
                    InfluLogger.print("Movie Sucessfull: " + movie.imdbTitle);
                    top250Movies.add(detailedMovie);
                }
                else
                {
                    InfluLogger.print("URL null for: " + movie.imdbTitle);
                }
            }
            catch (JSONException e)
            {
                InfluLogger.print("JSON Exception for: " + movie.imdbTitle + "URL: " + matchedMovieRTURL);
            }
        }

        String top250MoviesJSON = getJSONMovies(top250Movies);
        FileManager.writeToFile("TOP250Movies.data", top250MoviesJSON);
    }