Extracted new method to keep try catch block simple.