fixed errors related to pressing cancel in new file choice dialog