Some work on the duplication of a file (#255).