dir can be a path to a file
syntax errors repaired