updateplan: fix failure to read plan files when inserting into db
Will be integrating the server into the main body of code later