removed .sh suffice from mathlog.sh. Added testfile thing prohibit people from running two instances of mathlog.
fixed a syntax error