Adding log messages to try and work out bug. Cleaned up how we access/store settings