Fixing to use reflection to avoid unnecessary locking.
version and reformatting is it doesn't look like garbage
use getDeclaredField not getField since it's private
better logging.