speedup of exportJSON and refreshCaches by removing grep -v and sed from parsing (putting it into simple perl script)