Fixed a startup issue
Added env check to auto configure for appfog