Basic error reporting and review of the copyFile method implementation

I've implemented basic error reporting and did a slight review of changes made by @alchernin. 
Throttled request support is not yet implemented.