add a assert to test if the resource is a regular file.