Rename function & try before create object

New: renamed some function.
New: try local hosts file before create object, 'w+' for none, 'r' for exist.