Remove extraneous lines and add debug print statement