Remove whitespace
Add error checking to test
Fix test to work with systems enforcing memory limits