Better file processing for JSON