logging: use copy module, not file module