added way to get ip address through file instead of command