Logging completed. Could be tuned a bit, though.