Temporary fix for blocking problem.
Revert "Temporary fix for blocking problem."

This reverts commit 8e0d2d712e042537aa43b9016ccd526c7ad550a6.
Revert "Revert "Temporary fix for blocking problem.""

This reverts commit f95619f0ce5d69665e72dd1e4a2214e5037923d7.
Finished tests and switched to "select" preceeding the write.
Removed commented lines
Merge pull request #2 from mannmarkus/master

Thanks for fixing this.