add_user -> adduser
add open_flock
undefined variables fix