Added logging feature
Added missing #ifdef DEBUG conditions, Updated Linux cmake options