Added check that netoufile non NULL if storage is on