add missing header
remove loggingfp, add file lock process