If not hostname or filename is specified, use 'localhost'