THere is nothing in your code to display error messages to the consolem, so the 0 you see is not an error code. In fact, you should be seeing 00 and they are return codes from the function as explained int he manual and in several FAQs.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.