removing source from file when using template