remove rm /tmp/cor... since we have the trap for mktemp setup
cleaned up some areas where we changed to mktemp