Resolving problem of concurrent print