made perl syntax parser happy
added convenience method uri
added syswrite error checks