Refs #9 Fixed issue of checking rail environment