ADDED ERROR MODE + CHANGED DEFINES