separated in a new file the functions for working with R files