made the system more stable, by removing debugging stuff and adding some try catch statments
commands is not supported in python 3 and now using the replacement