Added a std::endl to the writeToFile(Json::Value) function.
This is just to minimize possible execution failure/bugginess. I don't know if not flushing the stream would cause a problem in execution.