generate source maps in separated file(closes #247)