Fixes file saving