logging added in code