Added some output, fixed an issue of function ordering