Cleanup Report generation

[#58103760]

- Moved report writing to end
- Added user error handling for report writing