fix metadata
write tmp dir config correctly