changed console error to log