Agent is now used instead of Atom to store state

Agent watches are not executed concurrently, therefore assuring thread-safety
of the file-saving watch.