Fix hook to be able to record both filename and uri.

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