reduce code duplication

use existing static function
log the catched exception somewhere