Add option to make program run in foreground.