Add hex loading. Add error functions