Replace broad try catch by function_exported