Read htmlfile into a buffer instead of a string