Fix output fix generation
Added bool check for debug logging