methods to convert between input editor as File and Program