add some error handling to delete_stash method