Added prep_sql_file function