Fix file save method using old logic