improve codes for opening dotfiles