move findfreeiocb function into its own object file