still have the race conditions here since you're dereferencing the atom multiple times.  I think what you want to do is put the call to `swap!` inside of a `let` block, and then make your logging statement and your return value use the variable from the `let`.  Then you won't have to dereference the atom at all.