adds debugging lines for return_code