Added a debug echo statement and removed delete on failure