get and print method and pathname