add error handling to test_sync_*.c

Added error handling to test_sync_io.c and test_short_dio_read.c