Missing bracket
Further syntax errors
Extra logging and better handling of collections