1024 is too short
detect buffer over run
error message to be more kind
hide index