It was running "cp mce.pdf $out/share/doc", which created the file 'doc'. Then buildEnv complained that 'share/doc' exists.