Added console output for debugging purposes.