Logging added

Second PR