Split up frmFile and added xml related code