make file_managed function to save variables