add exception catch and log