I just checked the documentation:
www.php.net/manual/en/streamwrapper.stream-flush.php

So, it is an implicit return of FALSE if not implemented. Reverting this line as a result.