t4k_test.c: Add error handling.