fwrite(): write of 2980 bytes failed with errno=28 No space left on device