read file to buffer and toString