Added tomb file and key file existence checks