Print method added for debugging.