Updated more deprecated methods
Fixed tests for file usage