private static void saveTrackingData(TrackingData td) { String s = Jsons.toJson(td); Writer r = null; try { log.info("ADD: " + s); File file = new File(getTrackingFile(Calendar.getInstance())); r = new OutputStreamWriter(new FileOutputStream(file, true), Charsets.UTF_8); r.append(s); r.append(Streams.LINE_SEPARATOR); } catch (IOException e) { log.error("Failed to save " + s, e); } finally { Streams.safeClose(r); } }