Need to correct doStreamin and create while loop in main.c