+ added error message logging