Improve filename, convert to SQL statements.