changed buffer from 1024 to 1025 to account for null chars also added 1025 bytes to dataBuf, but only wrote 1024 to strip nulls