Print output and return code when debug is on