Fixed the status and write methods on devtools.py
I need to review the whole code and refactor some sections to meet
the specifications, optimize performance and minimize filesize.

Thorough checking of this module is needed. Expect unused variables
and functions.