set-layout and some error handling
a macro for error handling: with-check
implement write-ics2 and the function calls to the ics library necessary for its implementation, also docs