Use copyFile instead of writeFile =<< readFile