Figured out file writing, SQL Lite errors preventing use