prepend license to all remaining files
minor improvements of robustness