regarding logging when running in the foreground