initial error handling

location_setting still has bug