Pass filename as `name` instead of passing full path as `dir`