Removed trailing whitespaces
Fixed reading log files with invalid chars at the end
Merge branch 'develop'