Moving debug message to right place