Fix for name containg illegal character problem and check if getSourcePath(triggerMsg) returns null