Inline marshalling test resources
Fix error handling