Removed unused log and changed exit code

updated version code