Added exit call to end of child process