modify export function
add log
use ERSY_HOME instead of hard-coded