creating dirs recursive
fixing bugs