Pass around sub_path file name

Will fix issue #652