replaced log with debug