basic class logger and error handler