tcx: tcx_screen_dump(): add error handling