raise ResourceNotFound when File.Value.path not found and InternalError otherwise.
don't bother with the declared order hack unless the user has explicitly asked for it. #343
add missing cls_name parameter. #343