removed errors
removed unused error handling code, console statements