make dir work by param