Minor Cleanup

Fix: No need to check dup flag
Clean: logging and error returns