wip add_dir_entry seems to be broken