rewrite read_dir to sync call props