Added yet more debug prints to try and see why 'pa_' is not being correctly appended to file name