writer exception - declare throw in main