Added some print lines

Added print lines and corrected some errors.