improved saving files (more common way)