Added settings to force log and change retry timeout; done some refactoring