dont write to output when running in foreground