Previously, the local save_file function didn’t accept kwargs, causing a crash when passed extra params. Added support to maintain consistency with AWS version. Fixes #2009