Changed exit call to use TasksApplications.exit()