fixed agent failures bit mask; refactoring of agent local database/log file status...