condensed file output (write) methods to speed up script