added error handling for copy pages.