Added pg in config.json as dependence
Changed to local IP and port
Added error handling