Simple script to add key entry with basic checks