some intermediate fix for logs
 Stage III: some experimentation with the MutableInteger (May have to revert)
Final commit