attempt at semaphore for in and out

currently locking up
exchanging correct # of file bits... out of order