Open and closed magnetospheric tail configurations and their stability