Changed debug to only print when it logged.

Signed-off-by: Lucas Arnström <lucasarnstrom@gmail.com>
 -- Version 1.4 --

Signed-off-by: Lucas Arnström <lucasarnstrom@gmail.com>