Actually it was saveProgram(File) that needed to be public.