added error reportings