Do error handling for copying or symlinking file.