Check if file is locked