When $TMPDIR is low on space PHP streams silently fail
Handle incomplete file write to cache