several improvements
- better error handling
- ignoring empty lines
- reducing boost requirements