Add IO instance for ToResult and Mainable