Fix "pending" state on files created by metadata plugin