added missing files
removed runtime errors
added better errors to production