Add autoOpen option. close #506