Creating factory to deal with adding a file to a project