support for -d switch