Do not crash when copying goes wrong.

Signed-off-by: Martin Raspaud <martin.raspaud@smhi.se>