Added extra logging for debugging