bugfix: extra check for an existing directory.