Add a little stability, added a logger for any errors