attempt to capture error messages; not working yet