Syntax Error

Fixed syntax error and also changed check() function in tool.py to work
even if the process finished before check was ran.