Added helper function to register lua library functions easily
Added lua function to write to console