stack.go
func NewStack(file *os.File) (*Stack, error) {
	stack := &Stack{file: file, fileName: file.Name()}
	err := stack.Repare()
	if err != nil {
		stack.Close()
		return nil, err
	}
	return stack, nil
}
func NewStack(file *os.File) (*Stack, error) {
	stack := &Stack{file: file, fileName: file.Name()}
	err := stack.Repare()
	if err != nil {
		stack.Close()
		return nil, err
	}
	return stack, nil
}
// NewStack - create new stack based on file