Added check to detect when the filesystem is getting full.