Fix for encoding in output .json file + rename.