null-or-empty check on 'file'