fix dir bug and add demo