Raspberry Pi port, piCore-15.0 is available!
The second sleep is not needed, sync does not return until all file have been written.