added some exception handling and aop logging