Added console log messages for debugging