@halton these variables are used both in and out the following try-catch block. So it's declared here.