Add error trapping and reporting to file handers [fixes #69025254]