update utils to more consistently normalize file objects