WIP - change log to use a separate metadata file