Fix some typos and incorrect log messages
Fix self.dir and dir variable errors

PSA: Don't use variables with the same name as a python builtin