added some debugging print
introduced a magic method which pickle calls before pickling, thisway we get rid of the ugly can't pickle blablabla