added util.c for error handler etc
added util.c for error handler etc