New Error Handling and filesCopied Helper Function