Don't call stream.close() unecessarily
Use async fs operations where possible and pass errors instead of throwing them in async calls