Currently during the check phase, the code considers the file to be a public key if the file exist - which is not necessarily true. This commits aims to ensure that the file is actually a publickey else returns false for the check.