fix unit test for inferring filename