Add processes check

Signed-off-by: Philip Luyckx <philip.luyckx@gmail.com>
Fix bug: set default values to local variables first

Signed-off-by: Philip Luyckx <philip.luyckx@gmail.com>