add success checking then document creating