remove non-existent entries from json file automatically

refs #4. Changing imprementation from ignoring non-existent entries to removing these entries from json file.