Add a message to the index file