Trying to convert pub key to corresponding hash 160.
Sounds good...
input.txt would have the public addresses inside
Errr.... addresses or pubkeys? You cannot go from an address -> pubkey. As the address is derived by hashing the pubkey, which is a one-way function. So you can only go pubkey -> address.
Also, in your code you are only using the SHA256 algorithm... There is no RIPEMD-160, so even if it is pubkeys that you have in the input file, you still wouldn't see the matching RIPEMD160.
Have a look at this:
http://gobittest.appspot.com/AddressIt shows step by step how to get from private key -> pubkey -> address and what hashes are done and when.
To see the Hash160:
Privkey -> Pubkey -> SHA-256 -> RIPEMD-160