Logging added
Modifying tests to make them pass