Adding trim to filename
Fix for issue #1014
Merge branch 'develop'