better wrap this in an if to suppress directory errors