more safe file operation.
merge all