write sourcemaps only if enabled in config
fixed wrong pointer to sourceMap flag