Fixed critical file saving issue