Added additional checks for existance testing