Remove callback, fn is sync
Simpler json writing