fix to error bad_arg when using priv_dir