Updated throw statements to throw a full error object
Added example custom data collection