lint warns here: move this and next three lines inside try/catch block above