You need to have some user input before the program exits through main or exit function and that should solve the problem.