Cannot use return value in write context

Signed-off-by: John Rayes <live627@gmail.com>
Merge pull request #752 from live627/A

Cannot use return value in write context