stack.go
func (s *Stack) Close() error {
	s.guard.Lock()
	defer s.guard.Unlock()
	if s.file != nil {
		err := s.file.Close()
		s.file = nil
		return err
	}
	return nil
}
func (s *Stack) Close() error {
	s.guard.Lock()
	defer s.guard.Unlock()
	if s.file != nil {
		err := s.file.Close()
		s.file = nil
		return err
	}
	return nil
}
// Close backend stack file. If access is requried, file will automatically reopened