Added to executenonquery function to output to console