Use write(position=-1) to work around problem writing in FIFOs