added skelton mode.
fixed a bug that the script tries to close unopened database.
make access to the database more efficient.
disabled -s option.