Changed filename to template and fixed so template value is stored in _wp_page_template