fixed issue with -d argument