Using a different method for saving file