Making check_errors method from node return the stdout as well as stderr