catch error on export