add filetype checking to newItem method for automatic adding