added file over write functionality to the document post type