add LOCK_EX flag
more meaningful const names