Also dump vocabulary.
Also dump user object if entity has UID property.
Make the directory is clean before dumping.
serialize() instead of json_decode.