Removed writeOnline stuff from writeOffline branch + debugging