Adds basic error handling to TWFY