Adding safe_source function for checking file existence before inclusion
Merge branch 'improvements'