Add Document model with error checking and error display