fix indentation and the case when create a new dir