Changed parameter naming and added test for file objects