added logs for debugging