Includes error handling and logging capability