I have modified the example bmi160_read_sensor_data.c, but now the output is gone. The output only appears when I kill the program or when I let it terminate.
Please make sure our always flush the buffer, just add
fflush(stdout);
after the printf command (it is there in the example, maybe you have deleted it while playing around with the code).