`dir` is actually the name of a built-in function, so I recommend avoiding it as a variable name.