improved error messages, added trim() for reading props