Amended documentation and variable names, fix possible crash if file path has no path character