add short -f option for running in foreground