add API key ckeckin' , error message printing and file storage of the key