Introduce file locking as an app

cc @DeepDiver1975