fixed error handling.
fixed copy source function.
updated history notes