fix file saving on shell