change ~ with Dir.home