Log function changer to save logs