Rescue if ruby code expansion failed, and log.warn

Continued from #11 to fix #10.