A cross platform filelock and single program instance implementation