open_by_handle: add filename to error reports