Added logging to COSM