Added initial version of trylock