This is won't work if multiple files are contained in the `text` argument as explained below.