added test for file method