more fine grained error handling when profile parsing