Fixed the bug no error message is returned if create or duplicate failed.