Added rudimentary offline detection and output format helpers