Handle partial write