Missing null-or-empty check on filename