Fix for TRQ-2129: system call write fail if writing too large amounts of data.