Added print function to help debugging.
c fixing