cleaned up code and added "..." when len(string) > BUFSIZE