Add resource existed check.